package ipt.capitulo10;
import java.io.*;
public class VerDirectorio{
  public static void main(String args[]){
    String nombreF;
    InputStreamReader f= 
	            new InputStreamReader(System.in);
    BufferedReader teclado = new BufferedReader(f);
    try{
      System.out.println( "Nombre del directorio");
      nombreF = teclado.readLine();
      File fc = new File( nombreF );
      File [] lista = fc.listFiles();
      for(int i=0; i<lista.length;i++)
        System.out.println(lista[i]);
    }catch (Exception e){
      System.out.println(e.getMessage());
    }	
  }
}

